import groovyx.twitter.Twitter

def twitter = new Twitter("guillaume.alleon@gmail.com", "****")

twitter.postUpdate("Finalizing first version of my Groovy Twitter API")

def u = twitter.getUser("glaforge")
println "Id of glaforge = ${u.id}"

def t = twitter.getFriendsTimeline(u)
t.each{println "by ${it.user.name} : ${it.text}"}

def f = twitter.friends
f.each{println it.name}

def x = twitter.tweets
x.each{println it}

twitter.logoff()
